<?php
/**
 * WWW首页
 * @author wsfuyibing <websearch@163.com>
 * @date 2013-12-18
 *
 * @link http://www.example.com/
 */
class SiteController extends BaseController{
	public  $layout = 'index';
	public function actionIndex(){

		
	
		$wapi = M('wapi')->wpull();
		
		var_dump($wapi);

		// $this->error();	
		// tester();
		// M('keywords')->url('中国人');
		// $this->render('index');
		// return;
		// $_t1 = microtime(true);
		// print '<pre>';
		// print_r (M('nosql/user/view')->field(1, '*'));
		// print_r (M('nosql/user/register')->init(1));
		// print_r (M('nosql/user/register')->init(2));

		/**
		* 发动态
		*/
		// print_r (M('nosql/relates/dynamic')->set(array('userid' => 2, 'type' => 'test', 'push' => 1)));
		// print_r (M('nosql/relates/dynamic')->del(1));
		// print_r (M('nosql/relates/dynamic')->get(1));

		/**
		* 看消息
		*/
		// print_r (M('nosql/relates/notice')->get(1, 'restats', true));
		// print_r (M('nosql/relates/notice')->del(1));
		// print 'New-Notice = ('.((int) nosql::app('get', 'user:1:notice_remind')).')'."\n";
		// print_r (M('nosql/relates/notice')->view(2, 1));
		/**
		* 写消息
		*/
		// print_r (M('nosql/relates/notice')->set(array('userid' => 1, 'sendid' => 2, 'type' => 'test')));
		// print_r (M('nosql/relates/notice')->set(array('userid' => 1, 'sendid' => 2, 'system' => 1, 'type' => 'test')));

		
		/**
		* 删关注
		*/
		// print_r(M('nosql/relates/follow')->del(0, 1, 2));
		/**
		* 读关注
		*/
		// print_r(M('nosql/relates/follow')->get(1, 'UNALERT'));
		// print_r(M('nosql/relates/follow')->get(1, 'self'));
		// print_r(M('nosql/relates/follow')->get(1, 'INTER', 2, 'SELF'));
		/**
		* 加关注
		*/
		// print_r(M('nosql/relates/follow')->set(1, 2));
		// print_r(M('nosql/relates/follow')->set(1, 3));
		// print_r(M('nosql/relates/follow')->set(1, 4));
		// print_r(M('nosql/relates/follow')->set(2, 3));
		// print_r(M('nosql/relates/follow')->set(2, 4));
		// print_r(M('nosql/relates/follow')->set(3, 4));
		// print_r(M('nosql/relates/follow')->set(4, 1));
		// print_r(M('nosql/relates/follow')->set(4, 2));
		// print_r(M('nosql/relates/follow')->set(4, 3));


		// print '<pre>';
		// $_t2 = microtime(true);
		// print 'Process in '.round(($_t2 - $_t1), 5);
		// exit;
		
		exit;
	}
}